package com.hotel.dto;

import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 房间类型数据传输对象
 */
public class RoomTypeDTO {
    
    @NotBlank(message = "房间类型名称不能为空")
    @Size(max = 50, message = "房间类型名称长度不能超过50个字符")
    private String name;
    
    @NotBlank(message = "房间类型编码不能为空")
    @Size(max = 20, message = "房间类型编码长度不能超过20个字符")
    @Pattern(regexp = "^[A-Z0-9_]+$", message = "房间类型编码只能包含大写字母、数字和下划线")
    private String code;
    
    @NotNull(message = "基础价格不能为空")
    @DecimalMin(value = "0.00", message = "基础价格不能小于0")
    @DecimalMax(value = "99999.99", message = "基础价格不能超过99999.99")
    private BigDecimal basePrice;
    
    @NotNull(message = "房间面积不能为空")
    @DecimalMin(value = "0.1", message = "房间面积必须大于0")
    @DecimalMax(value = "9999.9", message = "房间面积不能超过9999.9平方米")
    private BigDecimal area;
    
    @NotNull(message = "最大入住人数不能为空")
    @Min(value = 1, message = "最大入住人数必须大于0")
    @Max(value = 20, message = "最大入住人数不能超过20")
    private Integer maxOccupancy;
    
    @NotNull(message = "床位数不能为空")
    @Min(value = 1, message = "床位数必须大于0")
    @Max(value = 10, message = "床位数不能超过10")
    private Integer bedCount;
    
    @Size(max = 20, message = "床型长度不能超过20个字符")
    private String bedType;
    
    @Size(max = 500, message = "房间类型描述长度不能超过500个字符")
    private String description;
    
    @Size(max = 1000, message = "房间设施长度不能超过1000个字符")
    private String facilities;
    
    @Size(max = 1000, message = "房间服务长度不能超过1000个字符")
    private String services;
    
    @Size(max = 500, message = "图片URL长度不能超过500个字符")
    private String imageUrl;
    
    @Pattern(regexp = "^(enabled|disabled)$", message = "状态只能是：enabled(启用)、disabled(禁用)")
    private String status = "enabled";
    
    @Min(value = 0, message = "排序值不能小于0")
    @Max(value = 999, message = "排序值不能超过999")
    private Integer sortOrder = 0;
    
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remarks;
    
    // 构造函数
    public RoomTypeDTO() {}
    
    // Getter和Setter方法
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getCode() {
        return code;
    }
    
    public void setCode(String code) {
        this.code = code;
    }
    
    public BigDecimal getBasePrice() {
        return basePrice;
    }
    
    public void setBasePrice(BigDecimal basePrice) {
        this.basePrice = basePrice;
    }
    
    public BigDecimal getArea() {
        return area;
    }
    
    public void setArea(BigDecimal area) {
        this.area = area;
    }
    
    public Integer getMaxOccupancy() {
        return maxOccupancy;
    }
    
    public void setMaxOccupancy(Integer maxOccupancy) {
        this.maxOccupancy = maxOccupancy;
    }
    
    public Integer getBedCount() {
        return bedCount;
    }
    
    public void setBedCount(Integer bedCount) {
        this.bedCount = bedCount;
    }
    
    public String getBedType() {
        return bedType;
    }
    
    public void setBedType(String bedType) {
        this.bedType = bedType;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getFacilities() {
        return facilities;
    }
    
    public void setFacilities(String facilities) {
        this.facilities = facilities;
    }
    
    public String getServices() {
        return services;
    }
    
    public void setServices(String services) {
        this.services = services;
    }
    
    public String getImageUrl() {
        return imageUrl;
    }
    
    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }
    
    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    public Integer getSortOrder() {
        return sortOrder;
    }
    
    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }
    
    public String getRemarks() {
        return remarks;
    }
    
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    
    @Override
    public String toString() {
        return "RoomTypeDTO{" +
                "name='" + name + '\'' +
                ", code='" + code + '\'' +
                ", basePrice=" + basePrice +
                ", area=" + area +
                ", maxOccupancy=" + maxOccupancy +
                ", bedCount=" + bedCount +
                ", bedType='" + bedType + '\'' +
                ", description='" + description + '\'' +
                ", facilities='" + facilities + '\'' +
                ", services='" + services + '\'' +
                ", imageUrl='" + imageUrl + '\'' +
                ", status='" + status + '\'' +
                ", sortOrder=" + sortOrder +
                ", remarks='" + remarks + '\'' +
                '}';
    }
}